﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SurvivalStrategy.Entities.EnitityComponents;

namespace SurvivalStrategy.WorldData.ItemComponents
{
    public class Eatable : ItemComponent
    {
        public int RevievingEnergy { get; internal set; }

        public Eatable()
        {
            RevievingEnergy = 25;
        }

        public override void ProvokeAction(Entity provoker)
        {
            SurvivalComponent component = provoker.GetComponent<SurvivalComponent>();
            if (component != null)
                component.AddEnergy(RevievingEnergy);
        }

        public void SetRevievingEnergy(int energy)
        {
            RevievingEnergy = energy;
        }

    }
}
